<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" 
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:rich="http://richfaces.ajax4jsf.org/rich"
	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">

	<h:panelGrid rendered="#{pager.pageCount > 0}" columns="2"
		cellspacing="4" width="100%" id="pagingGrid"
		columnClasses="rad-framework-form-recordset,rad-framework-record-nav">
		
		<h:panelGroup>
		</h:panelGroup>
		
		<h:panelGroup>
			<a4j:commandButton id="firstButton"
				action="#{pager.findFirstPage}"
				eventsQueue="viewQ"
				reRender="#{reRender}"
				value="#{messages['FirstPage']}"
				immediate="true"
				disabled="#{!pager.previousPage}"
				image="#{messages['FirstIcon']}"/>
				
			<rich:spacer width="5" height="1"/>
			<a4j:commandButton id="prevButton"
				action="#{pager.findPreviousPage}"
				eventsQueue="viewQ"
				reRender="#{reRender}"
				value="#{messages['PreviousPage']}"
				immediate="true"
				disabled="#{!pager.previousPage}"
				image="#{messages['PreviousIcon']}"/>
				
			<rich:spacer width="5" height="1"/>
			<h:inputText id="pageCountTextBox" size="1"
				value="#{pager.pageNumber + 1}" disabled="true"
				required="false">
			</h:inputText>
			
			<rich:spacer width="5" height="1"/>
			<a4j:commandButton id="nextButton"
				action="#{pager.findNextPage}"
				eventsQueue="viewQ"
				reRender="#{reRender}"
				value="#{messages['NextPage']}"
				disabled="#{!pager.nextPage}"
				immediate="true"
				image="#{messages['NextIcon']}"/>
				
			<rich:spacer width="5" height="1"/>
			<a4j:commandButton id="lastButton"
				action="#{pager.findLastPage}"
				eventsQueue="viewQ"
				reRender="#{reRender}"
				value="#{messages['LastPage']}"
				immediate="true"
				disabled="#{!pager.nextPage}"
				image="#{messages['LastIcon']}"/>
			&#160;
			<h:outputText id="pageCount"
				value="#{messages['Page']} #{pager.pageNumber + 1} of #{pager.pageCount}"/>
		</h:panelGroup>
	</h:panelGrid>

</ui:composition>